package com.hmyuan.util;

import java.util.Iterator;
import java.util.List;

/**
 * StringUtil
 * @author wbtianhl
 *
 */
public class StringUtil {

	/**
	 *根据list获取字符串，以第二个参数分割 
	 */
	public String getStringByList(List ls,String s){
		StringBuffer sb = new StringBuffer();
		for (int i = 0; i < ls.size(); i++) {
			if(i==(ls.size()-1)){
				sb.append(ls.get(i));
			}else{
				sb.append(ls.get(i)).append(s);
			}
		}
		return sb.toString();
	}
}
